/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.test.sirona.javaagent;
import org.apache.sirona.javaagent.SironaTransformer;
import org.junit.Test;
import java.lang.instrument.IllegalClassFormatException;
import java.net.URL;
import java.net.URLClassLoader;
public class EnsureInstrumationDoesntFailTest {
@Test // just check it doesn't throw an exception, mainly a debug test
public void run() throws IllegalClassFormatException {
new SironaTransformer(true)
.transform(
new URLClassLoader(new URL[0]), App.class.getName().replace('.', '/'),
App.class, App.class.getProtectionDomain(), new byte[]{
-54, -2, -70, -66, 0, 0, 0, 50, 0, 60, 10, 0, 17, 0, 37, 5,
0, 0, 0, 0, 0, 0, 1, -12, 10, 0, 38, 0, 39, 10, 0, 16, 0,
40, 10, 0, 16, 0, 41, 5, 0, 0, 0, 0, 0, 0, 0, 100, 10, 0,
16, 0, 42, 5, 0, 0, 0, 0, 0, 0, 1, 44, 7, 0, 43, 9, 0, 44,
0, 45, 10, 0, 12, 0, 46, 10, 0, 44, 0, 47, 7, 0, 48, 7, 0,
49, 1, 0, 10, 76, 111, 103, 72, 97, 110, 100, 108, 101,
114, 1, 0, 12, 73, 110, 110, 101, 114, 67, 108, 97, 115,
115, 101, 115, 1, 0, 6, 60, 105, 110, 105, 116, 62, 1, 0,
3, 40, 41, 86, 1, 0, 4, 67, 111, 100, 101, 1, 0, 15, 76, 105, 110,
101, 78, 117, 109, 98, 101, 114, 84, 97, 98, 108, 101, 1, 0, 18,
76, 111, 99, 97, 108, 86, 97, 114, 105, 97, 98, 108, 101, 84, 97,
98, 108, 101, 1, 0, 4, 116, 104, 105, 115, 1, 0, 38, 76, 111, 114,
103, 47, 97, 112, 97, 99, 104, 101, 47, 116, 101, 115, 116, 47, 115,
105, 114, 111, 110, 97, 47, 106, 97, 118, 97, 97, 103, 101, 110, 116,
47, 65, 112, 112, 59, 1, 0, 3, 102, 111, 111, 1, 0, 10, 69, 120, 99,
101, 112, 116, 105, 111, 110, 115, 7, 0, 50, 1, 0, 4, 98, 101, 101,
114, 1, 0, 3, 112, 117, 98, 1, 0, 3, 98, 97, 114, 1, 0, 17, 114, 101,
100, 105, 114, 101, 99, 116, 83, 116, 114, 101, 97, 109, 111, 117, 116, 1,
0, 40, 40, 41, 76, 111, 114, 103, 47, 97, 112, 97, 99, 104, 101, 47, 116, 101,
115, 116, 47, 115, 105, 114, 111, 110, 97, 47, 106, 97, 118, 97, 97,
103, 101, 110, 116, 47, 65, 112, 112, 59, 1, 0, 10, 83, 111, 117, 114,
99, 101, 70, 105, 108, 101, 1, 0, 8, 65, 112, 112, 46, 106, 97, 118,
97, 12, 0, 20, 0, 21, 7, 0, 51, 12, 0, 52, 0, 53, 12, 0, 27, 0, 21, 12,
0, 31, 0, 21, 12, 0, 32, 0, 21, 1, 0, 47, 111, 114, 103, 47, 97, 112, 97,
99, 104, 101, 47, 116, 101, 115, 116, 47, 115, 105, 114, 111, 110, 97, 47, 106, 97, 118, 97, 97, 103, 101, 110, 116, 47, 65, 112, 112, 36, 76, 111, 103, 72, 97, 110, 100, 108, 101, 114, 7, 0, 54, 12, 0, 55, 0, 56, 12, 0, 20, 0, 57, 12, 0, 58, 0, 59, 1, 0, 36, 111, 114, 103, 47, 97, 112, 97, 99, 104, 101, 47, 116, 101, 115, 116, 47, 115, 105, 114, 111, 110, 97, 47, 106, 97, 118, 97, 97, 103, 101, 110, 116, 47, 65, 112, 112, 1, 0, 16, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 79, 98, 106, 101, 99, 116, 1, 0, 19, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 69, 120, 99, 101, 112, 116, 105, 111, 110, 1, 0, 16, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 84, 104, 114, 101, 97, 100, 1, 0, 5, 115, 108, 101, 101, 112, 1, 0, 4, 40, 74, 41, 86, 1, 0, 16, 106, 97, 118, 97, 47, 108, 97, 110, 103, 47, 83, 121, 115, 116, 101, 109, 1, 0, 3, 111, 117, 116, 1, 0, 21, 76, 106, 97, 118, 97, 47, 105, 111, 47, 80, 114, 105, 110, 116, 83, 116, 114, 101, 97, 109, 59, 1, 0, 25, 40, 76, 106, 97, 118, 97, 47, 105, 111, 47, 79, 117, 116, 112, 117, 116, 83, 116, 114, 101, 97, 109, 59, 41, 86, 1, 0, 6, 115, 101, 116, 79, 117, 116, 1, 0, 24, 40, 76, 106, 97, 118, 97, 47, 105, 111, 47, 80, 114, 105, 110, 116, 83, 116, 114, 101, 97, 109, 59, 41, 86, 0, 33, 0, 16, 0, 17, 0, 0, 0, 0, 0, 6, 0, 1, 0, 20, 0, 21, 0, 1, 0, 22, 0, 0, 0, 51, 0, 1, 0, 1, 0, 0, 0, 5, 42, -73, 0, 1, -79, 0, 0, 0, 2, 0, 23, 0, 0, 0, 10, 0, 2, 0, 0, 0, 25, 0, 4, 0, 61, 0, 24, 0, 0, 0, 12, 0, 1, 0, 0, 0, 5, 0, 25, 0, 26, 0, 0, 0, 1, 0, 27, 0, 21, 0, 2, 0, 22, 0, 0, 0, 53, 0, 2, 0, 1, 0, 0, 0, 7, 20, 0, 2, -72, 0, 4, -79, 0, 0, 0, 2, 0, 23, 0, 0, 0, 10, 0, 2, 0, 0, 0, 31, 0, 6, 0, 32, 0, 24, 0, 0, 0, 12, 0, 1, 0, 0, 0, 7, 0, 25, 0, 26, 0, 0, 0, 28, 0, 0, 0, 4, 0, 1, 0, 29, 0, 1, 0, 30, 0, 21, 0, 2, 0, 22, 0, 0, 0, 59, 0, 1, 0, 1, 0, 0, 0, 9, 42, -74, 0, 5, 42, -74, 0, 6, -79, 0, 0, 0, 2, 0, 23, 0, 0, 0, 14, 0, 3, 0, 0, 0, 37, 0, 4, 0, 38, 0, 8, 0, 39, 0, 24, 0, 0, 0, 12, 0, 1, 0, 0, 0, 9, 0, 25, 0, 26, 0, 0, 0, 28, 0, 0, 0, 4, 0, 1, 0, 29, 0, 1, 0, 31, 0, 21, 0, 2, 0, 22, 0, 0, 0, 61, 0, 2, 0, 1, 0, 0, 0, 11, 20, 0, 7, -72, 0, 4, 42, -74, 0, 9, -79, 0, 0, 0, 2, 0, 23, 0, 0, 0, 14, 0, 3, 0, 0, 0, 44, 0, 6, 0, 45, 0, 10, 0, 46, 0, 24, 0, 0, 0, 12, 0, 1, 0, 0, 0, 11, 0, 25, 0, 26, 0, 0, 0, 28, 0, 0, 0, 4, 0, 1, 0, 29, 0, 1, 0, 32, 0, 21, 0, 2, 0, 22, 0, 0, 0, 53, 0, 2, 0, 1, 0, 0, 0, 7, 20, 0, 10, -72, 0, 4, -79, 0, 0, 0, 2, 0, 23, 0, 0, 0, 10, 0, 2, 0, 0, 0, 51, 0, 6, 0, 52, 0, 24, 0, 0, 0, 12, 0, 1, 0, 0, 0, 7, 0, 25, 0, 26, 0, 0, 0, 28, 0, 0, 0, 4, 0, 1, 0, 29, 0, 1, 0, 33, 0, 34, 0, 1, 0, 22, 0, 0, 0, 61, 0, 3, 0, 1, 0, 0, 0, 15, -69, 0, 12, 89, -78, 0, 13, -73, 0, 14, -72, 0, 15, 42, -80, 0, 0, 0, 2, 0, 23, 0, 0, 0, 10, 0, 2, 0, 0, 0, 57, 0, 13, 0, 58, 0, 24, 0, 0, 0, 12, 0, 1, 0, 0, 0, 15, 0, 25, 0, 26, 0, 0, 0, 2, 0, 35, 0, 0, 0, 2, 0, 36, 0, 19, 0, 0, 0, 10, 0, 1, 0, 12, 0, 16, 0, 18, 0, 10
}
);
}
}