Search in sources :

Example 1 with ShutdownAllResponse

use of org.apache.geode.internal.admin.remote.ShutdownAllResponse in project geode by apache.

the class DataTypeJUnitTest method testDataSerializableFixedIDShort.

@Test
public void testDataSerializableFixedIDShort() throws IOException {
    DataSerializableFixedID value = new ShutdownAllResponse();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream out = new DataOutputStream(baos);
    InternalDataSerializer.writeDSFID(value, out);
    byte[] bytes = baos.toByteArray();
    String type = DataType.getDataType(bytes);
    assertEquals("org.apache.geode.internal.DataSerializableFixedID:" + ShutdownAllResponse.class.getName(), type);
}
Also used : DataOutputStream(java.io.DataOutputStream) DataSerializableFixedID(org.apache.geode.internal.DataSerializableFixedID) ShutdownAllResponse(org.apache.geode.internal.admin.remote.ShutdownAllResponse) ByteArrayOutputStream(java.io.ByteArrayOutputStream) UnitTest(org.apache.geode.test.junit.categories.UnitTest) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) Test(org.junit.Test)

Aggregations

ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 DataOutputStream (java.io.DataOutputStream)1 DataSerializableFixedID (org.apache.geode.internal.DataSerializableFixedID)1 ShutdownAllResponse (org.apache.geode.internal.admin.remote.ShutdownAllResponse)1 UnitTest (org.apache.geode.test.junit.categories.UnitTest)1 Test (org.junit.Test)1 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)1