ReceivedKeyedAppState { @NonNull public static ReceivedKeyedAppStateBuilder builder() { return new AutoValue_ReceivedKeyedAppState.Builder(); } ReceivedKeyedAppState(); @NonNull static ReceivedKeyedAppStateBuilder builder(); @NonNull abstract String getPackageName(); abstract long getTimestamp(); @NonNull abstract String getKey(); abstract int getSeverity(); @Nullable abstract String getMessage(); @Nullable abstract String getData();  }
@Test @SmallTest public void keyIsRequired() { ReceivedKeyedAppStateBuilder builder = ReceivedKeyedAppState.builder() .setPackageName(PACKAGE_NAME) .setTimestamp(TIMESTAMP) .setSeverity(SEVERITY_INFO) .setMessage(MESSAGE) .setData(DATA); try { builder.build(); fail(); } catch (IllegalStateException expected) { } }
@Test @SmallTest public void severityIsRequired() { ReceivedKeyedAppStateBuilder builder = ReceivedKeyedAppState.builder() .setPackageName(PACKAGE_NAME) .setTimestamp(TIMESTAMP) .setKey(KEY) .setMessage(MESSAGE) .setData(DATA); try { builder.build(); fail(); } catch (IllegalStateException expected) { } }
@Test @SmallTest public void packageNameIsRequired() { ReceivedKeyedAppStateBuilder builder = ReceivedKeyedAppState.builder() .setTimestamp(TIMESTAMP) .setKey(KEY) .setSeverity(SEVERITY) .setMessage(MESSAGE) .setData(DATA); try { builder.build(); fail(); } catch (IllegalStateException expected) { } }
@Test @SmallTest public void timestampIsRequired() { ReceivedKeyedAppStateBuilder builder = ReceivedKeyedAppState.builder() .setPackageName(PACKAGE_NAME) .setKey(KEY) .setSeverity(SEVERITY) .setMessage(MESSAGE) .setData(DATA); try { builder.build(); fail(); } catch (IllegalStateException expected) { } }